Skip to content

Add /symdb/v1/input proxy endpoint to bottlecap#1159

Closed
jchrostek-dd wants to merge 1 commit intomainfrom
john/live-debugger-rc
Closed

Add /symdb/v1/input proxy endpoint to bottlecap#1159
jchrostek-dd wants to merge 1 commit intomainfrom
john/live-debugger-rc

Conversation

@jchrostek-dd
Copy link
Copy Markdown
Contributor

Summary

  • Adds POST /symdb/v1/input proxy endpoint to the bottlecap trace agent
  • Enables dd-trace-py's SymbolDatabaseUploader to send symbol data through the extension to the Datadog backend (required for Live Debugger's "Debug with Bits" feature on Lambda)
  • Uses the same backend as the debugger (debugger-intake.{site}/api/v2/debugger), matching the Go trace agent's symDBProxyHandler in pkg/trace/api/symdb.go
  • Adds endpoint to the /info response so tracers can discover it

Context

Without this endpoint, SymbolDatabaseUploader in dd-trace-py successfully uploads 287 scopes to localhost:8126/symdb/v1/input but receives a 404 from the extension, preventing SymDB from being populated. This blocks the "Debug with Bits" / datadog_create_datadog_logpoint MCP tool from resolving source file paths for Python Lambda functions.

Test plan

  • cargo check passes (verified locally)
  • Verify POST /symdb/v1/input returns 200 and proxies to debugger-intake.datadoghq.com/api/v2/debugger
  • Verify endpoint appears in /info response

🤖 Generated with Claude Code

Adds support for the Symbol Database upload endpoint, enabling
dd-trace-py's SymbolDatabaseUploader to send symbol data through
the extension to the Datadog backend.

SymDB uses the same backend as the debugger (debugger-intake.{site}/api/v2/debugger),
matching the behavior of the Go trace agent's symDBProxyHandler.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 3, 2026 00:17
@jchrostek-dd jchrostek-dd requested a review from a team as a code owner April 3, 2026 00:17
@jchrostek-dd jchrostek-dd requested a review from lym953 April 3, 2026 00:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the /symdb/v1/input proxy endpoint to the bottlecap trace agent, enabling Python's SymbolDatabaseUploader to send symbol data to the Datadog backend. This is necessary for the Live Debugger's "Debug with Bits" feature to work on Lambda functions. The implementation mirrors the Go trace agent's implementation and routes symbol database uploads through the same debugger-intake backend as the debugger endpoints.

Changes:

  • Adds the /symdb/v1/input endpoint that proxies requests to the debugger-intake backend
  • Includes the endpoint in the /info response for tracer discoverability
  • Adds detailed logging for debugger proxy requests to aid debugging efforts

Comment on lines +695 to +701
if let Ok(body_str) = std::str::from_utf8(&body) {
let preview = if body_str.len() > 1000 {
format!("{}... (truncated)", &body_str[..1000])
} else {
body_str.to_string()
};
debug!("TRACE_AGENT | Debugger payload preview: {}", preview);
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logging code on lines 695-701 logs up to 1000 characters of the payload body for debugger endpoints. This could expose sensitive information such as source code, variable names, and other context from debugger snapshots. Consider logging only non-sensitive metadata (e.g., payload size, timestamp) instead of actual payload content.

Copilot generated this review using guidance from repository custom instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants